Fix emacsclient terminal corruption when in background.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Mar 2014 22:38:15 +0000 (15:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Mar 2014 22:38:15 +0000 (15:38 -0700)
commitcbdd805b07ce63885e9d83f009cc096d2739f2dd
tree7363c68246c892451910229c9174fdb0182a38d7
parent093e8fe6a8dfba400174ce12bc432099465783c0
Fix emacsclient terminal corruption when in background.

* emacsclient.c (handle_sigcont): Check for tcgetpgrp failure.
Cancel the continue only if tty.  Send SIGTTIN to the process
group, not SIGSTOP to self, as this is what the glibc manual
recommends.
(main): If tty, and if started in the background, send SIGTTIN
to the process group.
lib-src/ChangeLog
lib-src/emacsclient.c